/**
 * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.opsli.modulars.business.emergencyTask.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.opsli.api.wrapper.business.emergency.EmergencyReportModel;
import org.opsli.modulars.business.emergency.entity.EmergencyReport;
import org.opsli.modulars.business.emergencyTask.entity.EmergencyReportTask;
import org.opsli.modulars.business.emergencyTask.entity.EmergencyReportTaskApp;
import org.opsli.modulars.business.stationTask.entity.StationTask;

import java.util.List;

/**
 * 隐患派发任务 Mapper
 *
 * @author Ljc
 * @date 2022-03-22 15:34:15
 */
@Mapper
public interface EmergencyReportTaskMapper extends BaseMapper<EmergencyReportTask> {

    EmergencyReportTask findAllByStationId(@Param("stationId") String stationId);

    //查询进行中的隐患任务
    List<EmergencyReportTask> findListUserIdZero(@Param("userId") String userId);

    //查询已结束的隐患任务
    List<EmergencyReportTask> findListUserIdOne(@Param("userId") String userId);

    //获取隐患任务正在进行中的任务
    public List<EmergencyReportTaskApp> getMyList(@Param("model") EmergencyReportTaskApp model, @Param("beginSize") Integer beginSize, @Param("endSize") Integer endSize);


    int updateByPrimaryKeySelective(EmergencyReportTaskApp record);

}